package com.shiro.entity;

import org.springframework.data.mongodb.core.mapping.DBRef;



/**
 * 权限
 * 
 * @author erich
 * @version 1.0
 * @created 01-12-2013 16:36:04
 */

public class Permission extends IdEntity {
	
	// 系统模块
	@DBRef
	private Module module;
	
	//功能名称
	private String funcName;
	
	//功能代码  teacher:view, teacher:edit
	private String funcCode;
	
	private String app;

	public Permission() {
	}

	public Permission(String id) {
		setId(id);
	}

	public Module getModule() {
		if (null == module || module.getDelflag()) {
			return null;
		}
		return module;
	}

	public void setModule(Module module) {
		this.module = module;
	}
	
	public String getFuncName() {
		return funcName;
	}

	public void setFuncName(String funcName) {
		this.funcName = funcName;
	}

	public String getFuncCode() {
		return funcCode;
	}

	public void setFuncCode(String funcCode) {
		this.funcCode = funcCode;
	}

	public String getApp() {
		return app;
	}

	public void setApp(String app) {
		this.app = app;
	}
}